﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Jizsoft.JFrame.Modeling.Domain.Entities
{
    public class ModelRelation
    {
        /// <summary>
        /// 主模型id
        /// </summary>
        public Guid Model1Id { get; set; }

        /// <summary>
        /// 被关联的模型id
        /// </summary>
        public Guid Model2Id { get; set; }
        /// <summary>
        /// 多样性
        /// 1:one
        /// 2:many
        /// </summary>
        public int Model1Multiplicity { get; set; }

        /// <summary>
        /// 多样性
        /// 1:one
        /// 2:many
        /// </summary>
        public int Model2Multiplicity { get; set; }

        /// <summary>
        /// relation type  "1":"association","2":"composition"
        /// association:delete model1 can't delete related model2
        /// composition:delete model1 delete ralted model2
        /// </summary>
        public int Type { get; set; }

        public DateTime CreatedTime { get; set; }

        public string CreatorId { get; set; }
    }
}
